
export default {
  state: {},
  mutations: {},
  actions: {
    async getImageText(ctx, params) {
      let res = await Promise.all(
        params.map(item => {
          let formData = new FormData()
          formData.append("file", item)
          return ctx.dispatch("fetch", {
            url: "/getimagetext",
            params: formData,
            config: {
              headers: {
                "Content-Type": "multipart/form-data"
              }
            }
          })
        })
      )
      return res
    }
  }
}
